package vo;

import daoImpls.RoleDAOImpl;

public class Role extends PetObject {
    private String rid;
    private String rName;

    public Role() { }

    public Role(Role role) {
        this.rid = role.getRid();
        this.rid = role.getrName();
    }

    public Role(String rid) {
        this.rid = rid;
        this.rName = new RoleDAOImpl().get(rid).getrName();
    }

    public String getRid() {
        return rid;
    }

    public void setRid(String rid) {
        this.rid = rid;
    }

    public String getrName() {
        return rName;
    }

    public void setrName(String rName) {
        this.rName = rName;
    }

    @Override
    public String toString() {
        return "role{" +
                "rid='" + rid + '\'' +
                ", rName='" + rName + '\'' +
                '}';
    }
}
